Log in Register Dashboard Temp Share Shortlinks Frames API

HTMLify

style.css
Views: 7 | Author: cody
* {
  margin: 0;
}
body {
  height: 100vh;
  background-color: #121212;
  display: flex;
  align-items: center;
  justify-content: center;
}
.container {
  width: 7em;
  height: 7em;
  position: relative;
  scale: 1.5;
}
.button {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #090909;
  background-color: transparent;
  background-image: linear-gradient(145deg, #171717, #444245);
  box-sizing: border-box;
  box-shadow: inset 2px 2px 0 #7d7c7e, inset -2px -2px 0 #1c1c1c;
  display: flex;
  align-items: center;
  justify-content: center;
}
.container input {
  display: none;
}
.button::before {
  position: absolute;
  content: "";
  width: 7.25em;
  height: 7.25em;
  border-radius: inherit;
  background-color: transparent;
  background-image: linear-gradient(145deg, #262626, #3b3b3b);
  z-index: -1;
  box-shadow: 11px 11px 22px #050505, -5px -5px 20px #3d3d3d;
}
.button .icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.button .icon svg {
  height: 100%;
  width: 100%;
  fill: #969696;
}
.container input:checked + .button {
  box-shadow: inset -2px -2px 0 #5e5e5e, inset 2px 2px 0 #1c1c1c;
  border: 4px solid rgba(255, 60, 60, 0.5);
  animation: animeBorder 0.3s linear alternate-reverse infinite;
}
.container input:checked + .button .icon svg {
  fill: #ff3c3c;
  animation: animeFill 0.3s linear alternate-reverse infinite;
}
@keyframes animeFill {
  to {
    fill: rgba(255, 60, 60, 0.642);
  }
}
@keyframes animeBorder {
  to {
    border-color: rgba(255, 60, 60, 0.2);
  }
}

Comments